-
-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make file size uploads configurable via env vars #245
Make file size uploads configurable via env vars #245
Conversation
The information contained in an actual budget is now much more detailed than it was previously. Doubling this file size should prevent errors
Would it not be better to have these configurable via environment variable(s)? |
Especially with talks about the idea of a multi-user setup, it may be best to have this configurable. |
I've added them as env vars now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I really like where you're going with this. Just some small improvements I'd recommend to make :)
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Let's squash this PR if it gets merged, I am quite happy for people to never come across this atrocity ever again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there.. :)
Would you mind also doing a test run after you're happy with the changes? Just to verify that it still works as expected.
Sure thing, is there an image I can pull or am I verifying this outside of docker? |
I can confirm it works as expected with no configuration (defaults), and it also works with any combination of env vars |
Doesn't work for me when using env vars. |
@MatissJanis this should be good to go now. Please review below examples, I can write some tests for this also if needs be $ ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=500 DEBUG=actual:config node app # set one, replicate to all upload limits
.
.
actual:config using file sync limit 500mb +0ms
actual:config using sync encrypted file limit 500mb +0ms
actual:config using file limit 500mb +1ms $ ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=500 DEBUG=actual:config node app # set one, rest remain default
.
.
actual:config using file sync limit 500mb +0ms
actual:config using sync encrypted file limit 50mb +1ms
actual:config using file limit 20mb +0ms $ ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=500 DEBUG=actual:config node app # set one, rest remain default
.
.
actual:config using file sync limit 20mb +0ms
actual:config using sync encrypted file limit 500mb +0ms
actual:config using file limit 20mb +0ms $ ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=500 ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=300 DEBUG=actual:config node app # set two, overall file limit remains at default
.
.
actual:config using file sync limit 300mb +1ms
actual:config using sync encrypted file limit 500mb +0ms
actual:config using file limit 20mb +0ms $ ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=500 ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=100 DEBUG=actual:config node app
.
.
actual:config using file sync limit 100mb +1ms # set by ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB
actual:config using sync encrypted file limit 500mb +0ms
actual:config using file limit 100mb +0ms $ ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=500 ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=100 ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=230 DEBUG=actual:config node app
.
.
actual:config using file sync limit 230mb +0ms
actual:config using sync encrypted file limit 500mb +0ms
actual:config using file limit 100mb +0ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for your contribution!
(we are currently in merge freeze until the next release which means only bugfixes and low-risk changes will be merged; I will merge this PR once we've opened up merges again)
The information contained in an actual budget is now much more detailed than it was previously. Doubling this file size should prevent errors